package IC.Error;

import IC.AST.Interval;

public class ErrorStringIntervaled extends ErrorString
{
	private Interval _interval;
	
	public ErrorStringIntervaled(ErrorType type, String message, Interval interval) { this(type, message, interval, false); }
	
	public ErrorStringIntervaled(ErrorType type, String message, Interval interval, boolean isInLib)
	{
		super(type, message, isInLib);
		_interval = interval;
	}
	
	public Interval GetInterval() { return _interval; }

	public int GetFirstLine() { return _interval.GetMin(); }	//for sorting, default if nothing overides it!
	
	public Object Visit(Visitor visitor) { return visitor.Visit(this); }
}
